<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<body>
	<div class="container" style="width:98%;padding:8px;">
		<div class="row">
			<div class="panel panel-default">
				<div class="panel-heading">新增</div>
					<div class="panel-body">
						<form class="form-horizontal" role="form" id="dailogForm" action="<%=path%>/system/sysMenu/doMerge.do" method="POST">
							<input type="hidden" value="${sysMenu.menuId}" name="menuId" />
							<div class="form-group">
						    	<label for="parentId" class="col-sm-2 control-label" style="text-align:left;">父菜单</label>
						    	<div class="col-sm-8">
						    		  <select name="parentId" id="parentId"  title="菜单"  class="form-control center">
											<option value="0" <c:if test="${sysMenu.parentId == '0' }">selected="selected"</c:if>>顶级菜单</option>
											<c:forEach items="${menuList}" var="menu">
												<option value="${menu.menuId}" class="center" <c:if test="${sysMenu.parentId == menu.menuId }">selected="selected"</c:if>>${menu.menuName}</option>
											</c:forEach>
									  </select>
						    	</div>
							</div>
							<div class="form-group">
						    	<label for="menuName" class="col-sm-2 control-label" style="text-align:left;">菜单名称</label>
						    	<div class="col-sm-8">
								      <input type="text" value="${sysMenu.menuName}" name="menuName" id="menuName" class="form-control center"/>
						    	</div>
							</div>
							<div class="form-group">
						    	<label for="menuUrl" class="col-sm-2 control-label" style="text-align:left;">菜单路径</label>
						    	<div class="col-sm-8">
								      <input type="text" value="${sysMenu.menuUrl}" name="menuUrl" id="menuUrl" class="form-control center"/>
						    	</div>
							</div>
							<div class="form-group">
						    	<label for="menuOrder" class="col-sm-2 control-label" style="text-align:left;">菜单顺序</label>
						    	<div class="col-sm-8">
								      <input type="number" value="${sysMenu.menuOrder}" name="menuOrder" id="menuOrder" class="form-control center"/>
						    	</div>
							</div>
							<div class="form-group">
						    	<label for="menuType" class="col-sm-2 control-label" style="text-align:left;">菜单类型</label>
						    	<div class="col-sm-8">
								      <select name="menuType" id="menuType" title="菜单类型"  class="form-control center">
											<option value="1" <c:if test="${sysMenu.menuType == '1' }">selected="selected"</c:if> >系统菜单</option>
											<option value="2" <c:if test="${sysMenu.menuType == '2' }">selected="selected"</c:if> >业务菜单</option>
									  </select>
						    	</div>
							</div>
							<div class="form-group">
								<div class="col-sm-offset-5 col-sm-10">
									<a type="button" class="btn btn-sm btn-default" id="formReturn"  href="<%=path%>/system/sysMenu/list.do">返回</a>
   									<button type="button" class="btn btn-sm btn-primary" id="formSubmit" onclick ="javascript:$('#dailogForm').submit();">提交</button>
								</div>
 							</div>
						</form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>